package com.vitech.javacertification.threads.sharedcell;

class Consumer extends Thread {
  private SharedCell cell;
  private int n;

  
  public Consumer(SharedCell cell, int n) {
    this.cell = cell;
    this.n = n;
  }
  public void run () {
    for (int i = 0; i < n; i++)
      System.out.println ("Consumer: "   + i + " value = " + cell.fetch ());
  }
}

